package com.huanwei.cc.ui;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhuwenhai on 2017/12/1.
 */

public class BaseViewPagerAdapter extends FragmentPagerAdapter {

    private List<Fragment> mFragmentList = new ArrayList<Fragment>();

    public BaseViewPagerAdapter(FragmentManager fm, List<Fragment> mFragmentLists) {
        super(fm);
        this.mFragmentList = mFragmentLists;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragmentList.get(position);
    }


    @Override
    public int getCount() {
        return mFragmentList.size();
    }

}
